<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <input type="file" name="" id="file_input" onchange="show_image()">
  <img src="" alt="" id="show_img" style="width: 100px;height: 100px; display: none;">
</body>
<script>
  function show_image() {
    file_input = document.getElementById("file_input");
    show_img = document.getElementById("show_img");
    show_img.src = window.URL.createObjectURL(file_input.files[0]);
    show_img.style.display = 'block';
  }
</script>

</html>